package com.linfeng.api.controller;


import com.linfeng.api.annotation.AuthCheck;
import com.linfeng.api.service.TrymallIssueService;
import com.linfeng.common.domain.TrymallIssue;
import com.linfeng.common.response.ApiResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 常见问题表 前端控制器
 * </p>
 *
 * @author linfeng
 * @since 2020-08-28
 */
@RestController
@RequestMapping("/trymallIssue")
public class TrymallIssueController {

    @Autowired
    private TrymallIssueService trymallIssueService;

    @AuthCheck
    @GetMapping("/api/findAll")
    public ApiResult<List<TrymallIssue>> findAll(){
        List<TrymallIssue> all = trymallIssueService.findAll();
        return ApiResult.ok(all);
    }
}

